#pragma once

#include "base/core/singleton.h"
#include "base/core/object_pool.h"
#include "Scene/SceneMgr.h"
#include "Common/ComDefine.pb.h"
#include "Common/DuplicateDefine.h"
#include "CondA.h"
#include "CondB.h"
#include "CondC.h"
#include "CondD.h"
#include "CondE.h"
#include "CondEmpty.h"
#include "CondF.h"
#include "CondG.h"
#include "CondH.h"
#include "CondI.h"


//副本完成条件管理
class CondMgr : public ManualSingleton < CondMgr >
{
	friend class ManualSingleton < CondMgr >;
public:
	CondMgr();
	~CondMgr();
	bool Init();
	void UnInit();
	ICond *MakeCondObj(int8_t byCondType);
	void FreeCondObj(ICond *pCondObj);
	void RecycleCond(ICond *pCond);
private:
	ObjectPool<CondA> *m_pCondAPool;
	ObjectPool<CondB> *m_pCondBPool;
	ObjectPool<CondC> *m_pCondCPool;
	ObjectPool<CondD> *m_pCondDPool;
	ObjectPool<CondE> *m_pCondEPool;
	ObjectPool<CondF> *m_pCondFPool;
	ObjectPool<CondG> *m_pCondGPool;
	ObjectPool<CondH> *m_pCondHPool;
	ObjectPool<CondI> *m_pCondIPool;
	ObjectPool<CondEmpty> *m_pCondEmptyPool;
	
};


#define g_MakeCondMgr() (CondMgr::Instance())
#define g_GetCondMgr()  (CondMgr::GetInstance())
#define g_DelCondMgr()  (CondMgr::Destroy())